import request from "../../utils/request.js"

/**
 * 获取资金账户列表
 * @param {*} data
 */
export const getFundAccountPage = (data) => {
    return request({
        url: "/finance/fundAccount/page",
        method: "get",
        data
    })
}

/**
 * 删除资金账户
 * @param {*} data
 */
export const deleteFundAccount = (data) => {
    return request({
        url: "/finance/fundAccount/batchDelete",
        method: "delete",
        data
    })
}

/**
 * 新增或修改资金账户
 * @param {*} data
 */
export const saveOrUpdateFundAccount = (data) => {
    return request({
        url: "/finance/fundAccount/saveOrUpdate",
        method: "put",
        data
    })
}

/**
 * 根据名称获取资金账户列表
 * @param {*} data
 */
export const getFundAccountListByName = (data) => {
    return request({
        url: `/finance/fundAccount/${data}`,
        method: "get",
    })
}
